from os import close
from selenium import webdriver
import time
url = 'http://47.103.13.124:8001/limit_canvas'
def rand_strings():
    driver = webdriver.Chrome(executable_path='chromedriver.exe')
    driver.get(url)
    driver.add_cookie({'name':'session','value':'.eJyrViotTi1SsqpWyiyOT0zJzcxTsjLQUcrJTwexSopKU3WUcvOTMnNSlayUDM3gQEkHrDE-M0XJyhjCzkvMBSmKKTVNMjMDkiamFkq1tQDfeR3n.YMTGGQ.MMAqCUnB1OPOnmrBP6QnQryjT8I'})
    driver.get(url)
    time.sleep(4)
    l = driver.find_elements_by_tag_name('a')
    for i in l[1:-1]:
        # print('time=',i.text)
        img = i.find_element_by_tag_name('img').get_attribute('src')
        title = i.find_element_by_tag_name('h5').text
        jianJie = i.find_element_by_tag_name('p').text
        pingFen = i.find_elements_by_tag_name('small')[0].text
        ganXiang = i.find_elements_by_tag_name('small')[1].text
        print('**************',img,title,jianJie,pingFen,ganXiang,'*********************')
rand_strings()



























